package com.ss.android.article.base.feature.user.location;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.ss.android.article.base.feature.user.location.model.Location;
import java.util.List;

public final class c extends BaseAdapter {
    public static final class a {
        protected final ProvinceSelectedActivity a;

        a(ProvinceSelectedActivity arg1) {
            this.a = arg1;
        }
    }

    a a;
    private List b;

    public c() {

    }

    public final void a(List arg1) {
        this.b = arg1;
        this.notifyDataSetChanged();
    }

    public final int getCount() {
        int v0 = this.b == null ? 0 : this.b.size();
        return v0;
    }

    public final Object getItem(int arg2) {
        return this.b.get(arg2);
    }

    public final long getItemId(int arg3) {
        return ((long)arg3);
    }

    public final View getView(int arg7, View arg8, ViewGroup arg9) {
        Object v0 = this.b.get(arg7);
        View v3 = LayoutInflater.from(arg9.getContext()).inflate(com.ss.android.article.browser.R.layout.eo, arg9, false);
        View v1 = v3.findViewById(com.ss.android.article.browser.R.id.wy);
        View v2 = v3.findViewById(com.ss.android.article.browser.R.id.xf);
        ((TextView)v1).setText(((Location)v0).province);
        if(((Location)v0).areas == null || (((Location)v0).areas.isEmpty())) {
            ((ImageView)v2).setVisibility(View.GONE);
        }
        else {
            ((ImageView)v2).setVisibility(View.VISIBLE);
        }

        v3.setOnClickListener(new d(this, ((Location)v0)));
        return v3;
    }
}

